<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>{$system.web_name}</title>
	<meta name="keywords" content="">
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<link rel="stylesheet" href="/home/css/base.css">
	<link rel="stylesheet" type="text/css" href="/home/css/swiper.min.css"/>
	<link rel="stylesheet" href="/home/css/dian.css">
	<script src="/home/js/jquery.min.js"></script>
	<script src="/home/js/swiper.min.js"></script>
</head>
<body>
	<div class="dian-content o_hidden">
		<div class="dc-top o_hidden">
			<img src="/home/img/l_03.png" alt="" class="dc-img">
			<img src="/home/img/a_06.png" alt="" class="dc-img1">
		</div>
		<div class="ac-bottom o_hidden">
			<div class="ac-list o_hidden">
				<ul class="o_hidden">
					<li>
						<select onchange="window.location=this.value">
							<option value="/index/pingfen_sure.html?">培训机构选择</option>
							{volist name="school" id="s"}
							<option value="/index/pingfen_sure.html?sid={$s.aid}" {:$sid==$s.aid?'selected':''}>{$s.name}</option>
							{/volist}
						</select>
					</li>
					{if condition="!empty($card)"}
					<li>
						<select onchange="window.location=this.value">
							<option value="/index/pingfen_sure.html?sid={$sid}">考试等级选择</option>
							{volist name="card" id="c"}
							<option value="/index/pingfen_sure.html?cid={$c.id}&sid={$sid}" {:$cid==$c.id?'selected':''}>{$c.name}</option>
							{/volist}
						</select>
					</li>
					{/if}
					{if condition="!empty($group)"}
					<li>
						<select onchange="window.location=this.value">
							<option value="/index/pingfen_sure.html?cid={$cid}&sid={$sid}">分组选择</option>
							{volist name="group" id="g"}
							<option value="/index/pingfen_sure.html?cid={$cid}&sid={$sid}&gid={$g.groups}" {:$gid==$g.groups?'selected':''}>第{$g.groups}组</option>
							{/volist}
						</select>
					</li>
					{/if}
					<li><a href="/index/school.html" class="dd-buttom" style="margin-top:0;">一键返回</a></li>
				</ul>
			</div>
			<form id="myform">
				<div class="ac-ul o_hidden">
					<ul class="o_hidden">
						{volist name="list" id="l"}
						<li class="hn">
							<div class="ac-ulist">
								<div class="ac-ttop">
									<div class="ac-uleft"><img src="{:$l.img!=''?$l.img:'/home/img/student_img.jpg'}"></div>
									<div class="ac-uright">
										<ul class="o_hidden">
											<li>编号：<span>{$l.num}</span><span style="margin-left:30px;color:red;">{$l.step}</span></li>
											<li>姓名：<span>{$l.name}</span></li>
											<li>性别：<span>{:$l.sex==1?'男':''}{:$l.sex==2?'女':''}</span></li>
											<li>年龄：<span></span>{$l.age}</li>
											<li>等级：<span></span>{$l.cname}</li>
										</ul>
									</div>
								</div>
								<div class="ac-bb o_hidden">
									<ul class="o_hidden student-score {:$l.score!=''?'cur':''}">
										<li data-id="{$l.id}" data-score="不及格" {:$l.score=='不及格'?'class="cur"':''} style="width:20%"><p>不及格</p></li>
										<li data-id="{$l.id}" data-score="合格" {:$l.score=='合格'?'class="cur"':''} style="width:20%"><p>合格</p></li>
										<li data-id="{$l.id}" data-score="良好" {:$l.score=='良好'?'class="cur"':''} style="width:20%"><p>良好</p></li>
										<li data-id="{$l.id}" data-score="优良" {:$l.score=='优良'?'class="cur"':''} style="width:20%"><p>优良</p></li>
										<li data-id="{$l.id}" data-score="优秀" {:$l.score=='优秀'?'class="cur"':''} style="width:20%"><p>优秀</p></li>
										<input type="hidden" name="id{$key}" value="{$l.id}">
										<input type="hidden" name="score{$key}" value="{$l.score}" data-id="{$l.num}" class="scores">
									</ul>
								</div>
							</div>
						</li>
						{/volist}
					</ul>
				</div>
				{if condition="!empty($list)"}
				<div class="ac-list o_hidden" style="width: 100%;">
					<ul class="o_hidden">					
						<li style="width: 40%"><p style="line-height: 30px;font-size: 14px;">考官签字：<input type="text" name="teacher" value=""></p></li>
						<li style="width: 40%"><p style="line-height: 30px;font-size: 14px;">机构签字：<input type="text" name="school" value=""></p></li>
						<li style="width: 20%"><a href="javascript:;" class="dd-buttom tijiao" style="margin-top:0;">保存</a></li>
					</ul>
				</div>
				{/if}
			</form>
		</div>
	</div>
	<script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
	<script type="text/javascript" src="/demo/layer3.1.0/layer/layer.js"></script>
	<script>
		$(function(){
			$(".ac-bb ul li").click(function(){
				var score=$(this).attr("data-score");
				$(this).parent(".student-score").find(".scores").val(score);
				$(this).addClass("cur").siblings().removeClass("cur");
			})

			$(".search").click(function(){
				var stime=$("input[name=stime]").val();
					etime=$("input[name=etime]").val();
					str='';
					if (stime!='') {str+='&stime='+stime;}
					if (etime!='') {str+='&etime='+etime;}
				console.log(location.href+str);
				window.href=location.replace(location.href+str);
			})
			
			$(".tijiao").click(function(){
				var teacher=$("input[name=teacher]").val();
				var school=$("input[name=school]").val();
				if (teacher=='' || school=='') {layer.msg('请考官和机构确认签字！',{icon:7,time:1500});return false;}
				var data=$("#myform").serialize();//console.log(data);//return false;

				$.post("/index/pingfen_sure.html",$("#myform").serialize(),function(res){
					console.log(res);
					if(res.code==200){
						layer.msg(res.msg,{icon:1,time:1500},function(){
							window.href=location.replace(location.href);
						});
					}else{
						layer.msg(res.msg,{icon:7,time:1500})
					}
				})
			})
		})
	</script>
</body>
</html>